Optimal. Leaf size=64 \[ \frac{i c^2 (a+i a \tan (e+f x))^{m+1}}{a f (m+1)}-\frac{2 i c^2 (a+i a \tan (e+f x))^m}{f m} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13129, antiderivative size = 64, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.097, Rules used = {3522, 3487, 43} \[ \frac{i c^2 (a+i a \tan (e+f x))^{m+1}}{a f (m+1)}-\frac{2 i c^2 (a+i a \tan (e+f x))^m}{f m} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3522
Rule 3487
Rule 43
Rubi steps
\begin{align*} \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^2 \, dx &=\left (a^2 c^2\right ) \int \sec ^4(e+f x) (a+i a \tan (e+f x))^{-2+m} \, dx\\ &=-\frac{\left (i c^2\right ) \operatorname{Subst}\left (\int (a-x) (a+x)^{-1+m} \, dx,x,i a \tan (e+f x)\right )}{a f}\\ &=-\frac{\left (i c^2\right ) \operatorname{Subst}\left (\int \left (2 a (a+x)^{-1+m}-(a+x)^m\right ) \, dx,x,i a \tan (e+f x)\right )}{a f}\\ &=-\frac{2 i c^2 (a+i a \tan (e+f x))^m}{f m}+\frac{i c^2 (a+i a \tan (e+f x))^{1+m}}{a f (1+m)}\\ \end{align*}
Mathematica [B] time = 41.0072, size = 131, normalized size = 2.05 \[ -\frac{i c^2 2^{m+1} e^{-i (e+f x)} \left (e^{i f x}\right )^m \left (\frac{e^{i (e+f x)}}{1+e^{2 i (e+f x)}}\right )^{m+1} \left (e^{2 i (e+f x)}+m+1\right ) \sec ^{-m}(e+f x) (\cos (f x)+i \sin (f x))^{-m} (a+i a \tan (e+f x))^m}{f m (m+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.261, size = 100, normalized size = 1.6 \begin{align*} -{\frac{{c}^{2}\tan \left ( fx+e \right ){{\rm e}^{m\ln \left ( a+ia\tan \left ( fx+e \right ) \right ) }}}{f \left ( 1+m \right ) }}-{\frac{i{{\rm e}^{m\ln \left ( a+ia\tan \left ( fx+e \right ) \right ) }}{c}^{2}}{f \left ( 1+m \right ) }}-{\frac{2\,i{{\rm e}^{m\ln \left ( a+ia\tan \left ( fx+e \right ) \right ) }}{c}^{2}}{fm \left ( 1+m \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{2}{\left (i \, a \tan \left (f x + e\right ) + a\right )}^{m}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.67163, size = 213, normalized size = 3.33 \begin{align*} \frac{{\left (-2 i \, c^{2} m - 2 i \, c^{2} e^{\left (2 i \, f x + 2 i \, e\right )} - 2 i \, c^{2}\right )} \left (\frac{2 \, a e^{\left (2 i \, f x + 2 i \, e\right )}}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}\right )^{m}}{f m^{2} + f m +{\left (f m^{2} + f m\right )} e^{\left (2 i \, f x + 2 i \, e\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{2}{\left (i \, a \tan \left (f x + e\right ) + a\right )}^{m}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]